package com.example.controller;

import com.example.springaop.TimeRecord;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

@Slf4j
@RequestMapping("/test")
@RestController
public class Test {
    @TimeRecord
    @RequestMapping("/t1")
    public String t1() {
        log.info("t1方法执行");
        return "t1";
    }

    @RequestMapping("/t2")
    public String t2() {
        log.info("t2方法执行");
        int a = 10 / 0;
        return "t1";
    }

}
